package com.bank.payment.controller;

import com.bank.payment.entity.User;
import com.bank.payment.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableAutoConfiguration
@RequestMapping("/testboot")
public class TestBootController {
    @Autowired
    private UserService userService;

    @GetMapping("getuser")
    public User getUser(String id) {
        return userService.getUserById(id);
    }

    @RequestMapping("helloBoot")
    public String helloBoot() {
        return "Hello Boot-JPA";
    }
}